/*
*************************************************************************
*西瑞克斯研发管理系统
*版 本: 1.0   
*日 期：02/16/2012    
*作 者： 王浩 QQ：873987060   
*************************************************************************   
*/ 

package com.application.systemmanager.struts.form;
import java.util.Date;

import javax.servlet.http.HttpServletRequest;

import org.apache.commons.lang.builder.ReflectionToStringBuilder;
import org.apache.commons.lang.builder.ToStringStyle;
import org.apache.struts.action.ActionErrors;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionMapping;

import com.manager.commons.StringUtil;
 
public class ProcessForm extends ActionForm {

	/** serialVersionUID */
	protected static final long serialVersionUID = -1L;

	public ProcessForm() {

	}
    
	private Long bussType;
	
	private Date startDate;
	
	private Date endDate;
	
	private String org;
	
	private String state;
	
	private String startDateStr;
	
	private String endDateStr;
	
	private String createname;
    
	public String getCreatename() {
		return createname;
	}

	public void setCreatename(String createname) {
		this.createname = createname;
	}

	/**
	 * Method validate
	 * 
	 * @param mapping
	 * @param request
	 * @return ActionErrors
	 */
	public ActionErrors validate(ActionMapping mapping, HttpServletRequest request) {
		// TODO Auto-generated method stub
		return null;
	}

	/**
	 * Method reset
	 * 
	 * @param mapping
	 * @param request
	 */
	public void reset(ActionMapping mapping, HttpServletRequest request) {

	}


	
	


	public Date getStartDate() {
		return startDate;
	}

	public void setStartDate(Date startDate) {
		this.startDate = startDate;
	}

	public Date getEndDate() {
		return endDate;
	}

	public void setEndDate(Date endDate) {
		this.endDate = endDate;
	}

	public String toString() {
		return ReflectionToStringBuilder.toString(this, ToStringStyle.MULTI_LINE_STYLE);
	}

	public Long getBussType() {
		return bussType;
	}

	public void setBussType(Long bussType) {
		this.bussType = bussType;
	}

	public String getOrg() {
		return org;
	}

	public void setOrg(String org) {
		this.org = org;
	}

	public String getState() {
		return state;
	}

	public void setState(String state) {
		this.state = state;
	}

	public String getStartDateStr() {
		String re = "";
		if (this.startDate == null) {
			return re;
		}
		try {
			re = StringUtil.dateToString(this.startDate);
		} catch (Exception e) {
			e.printStackTrace();
		}
		return re;
	}

	public void setStartDateStr(String startDateStr) {
		
		this.startDateStr = startDateStr;
		if (this.startDateStr != null && !"".equals(this.startDateStr)) {
			try {
				this.startDate = StringUtil.stringToDate(this.startDateStr);
			} catch (Exception e) {
				e.printStackTrace();
			}
		}
	}

	public String getEndDateStr() {
		String re = "";
		if (this.endDate == null) {
			return re;
		}
		try {
			re = StringUtil.dateToString(this.endDate);
		} catch (Exception e) {
			e.printStackTrace();
		}
		return re;
	}

	public void setEndDateStr(String endDateStr) {
		this.endDateStr = endDateStr;
		if (this.endDateStr != null && !"".equals(this.endDateStr)) {
			try {
				this.endDate = StringUtil.stringToDate(this.endDateStr);
			} catch (Exception e) {
				e.printStackTrace();
			}
		}
	}
}
